package com.iris.live.services.data.models;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * Created by HangLiu on 2017/2/20.
 */
@Entity
@Table(name = "t_ins_buy", schema = "live", catalog = "")
public class TInsBuyModel {
    private Integer insId;
    private Integer carid;
    private BigDecimal forcedCost;
    private BigDecimal busCost;
    private BigDecimal forcedPoundage;
    private BigDecimal busPoundage;
    private String forcedInsureTime;
    private String busInsureTime;
    private String forcedInsCom;
    private String busInsCom;
    private String forcedInsureStart;
    private String forcedInsureEnd;
    private String busInsureStart;
    private String busInsureEnd;
    private String forcedOpTime;
    private Integer busYear;
    private Integer forcedYear;
    private String busOpTime;
    private String forcedNumber;
    private String busEnd;
    private String forcedEnd;
    private String busNumber;
    private String updateid;
    private Timestamp updatetime;

    @Id
    @Column(name = "insID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getInsId() {
        return insId;
    }

    public void setInsId(Integer insId) {
        this.insId = insId;
    }

    @Basic
    @Column(name = "carid")
    public Integer getCarid() {
        return carid;
    }

    public void setCarid(Integer carid) {
        this.carid = carid;
    }

    @Basic
    @Column(name = "forced_cost")
    public BigDecimal getForcedCost() {
        return forcedCost;
    }

    public void setForcedCost(BigDecimal forcedCost) {
        this.forcedCost = forcedCost;
    }

    @Basic
    @Column(name = "bus_cost")
    public BigDecimal getBusCost() {
        return busCost;
    }

    public void setBusCost(BigDecimal busCost) {
        this.busCost = busCost;
    }

    @Basic
    @Column(name = "forced_poundage")
    public BigDecimal getForcedPoundage() {
        return forcedPoundage;
    }

    public void setForcedPoundage(BigDecimal forcedPoundage) {
        this.forcedPoundage = forcedPoundage;
    }

    @Basic
    @Column(name = "bus_poundage")
    public BigDecimal getBusPoundage() {
        return busPoundage;
    }

    public void setBusPoundage(BigDecimal busPoundage) {
        this.busPoundage = busPoundage;
    }

    @Basic
    @Column(name = "forced_insure_time")
    public String getForcedInsureTime() {
        return forcedInsureTime;
    }

    public void setForcedInsureTime(String forcedInsureTime) {
        this.forcedInsureTime = forcedInsureTime;
    }

    @Basic
    @Column(name = "bus_insure_time")
    public String getBusInsureTime() {
        return busInsureTime;
    }

    public void setBusInsureTime(String busInsureTime) {
        this.busInsureTime = busInsureTime;
    }

    @Basic
    @Column(name = "forced_ins_com")
    public String getForcedInsCom() {
        return forcedInsCom;
    }

    public void setForcedInsCom(String forcedInsCom) {
        this.forcedInsCom = forcedInsCom;
    }

    @Basic
    @Column(name = "bus_ins_com")
    public String getBusInsCom() {
        return busInsCom;
    }

    public void setBusInsCom(String busInsCom) {
        this.busInsCom = busInsCom;
    }

    @Basic
    @Column(name = "forced_insure_start")
    public String getForcedInsureStart() {
        return forcedInsureStart;
    }

    public void setForcedInsureStart(String forcedInsureStart) {
        this.forcedInsureStart = forcedInsureStart;
    }

    @Basic
    @Column(name = "forced_insure_end")
    public String getForcedInsureEnd() {
        return forcedInsureEnd;
    }

    public void setForcedInsureEnd(String forcedInsureEnd) {
        this.forcedInsureEnd = forcedInsureEnd;
    }

    @Basic
    @Column(name = "bus_insure_start")
    public String getBusInsureStart() {
        return busInsureStart;
    }

    public void setBusInsureStart(String busInsureStart) {
        this.busInsureStart = busInsureStart;
    }

    @Basic
    @Column(name = "bus_insure_end")
    public String getBusInsureEnd() {
        return busInsureEnd;
    }

    public void setBusInsureEnd(String busInsureEnd) {
        this.busInsureEnd = busInsureEnd;
    }

    @Basic
    @Column(name = "forced_op_time")
    public String getForcedOpTime() {
        return forcedOpTime;
    }

    public void setForcedOpTime(String forcedOpTime) {
        this.forcedOpTime = forcedOpTime;
    }

    @Basic
    @Column(name = "bus_year")
    public Integer getBusYear() {
        return busYear;
    }

    public void setBusYear(Integer busYear) {
        this.busYear = busYear;
    }

    @Basic
    @Column(name = "forced_year")
    public Integer getForcedYear() {
        return forcedYear;
    }

    public void setForcedYear(Integer forcedYear) {
        this.forcedYear = forcedYear;
    }

    @Basic
    @Column(name = "bus_op_time")
    public String getBusOpTime() {
        return busOpTime;
    }

    public void setBusOpTime(String busOpTime) {
        this.busOpTime = busOpTime;
    }

    @Basic
    @Column(name = "forced_number")
    public String getForcedNumber() {
        return forcedNumber;
    }

    public void setForcedNumber(String forcedNumber) {
        this.forcedNumber = forcedNumber;
    }

    @Basic
    @Column(name = "bus_end")
    public String getBusEnd() {
        return busEnd;
    }

    public void setBusEnd(String busEnd) {
        this.busEnd = busEnd;
    }

    @Basic
    @Column(name = "forced_end")
    public String getForcedEnd() {
        return forcedEnd;
    }

    public void setForcedEnd(String forcedEnd) {
        this.forcedEnd = forcedEnd;
    }

    @Basic
    @Column(name = "bus_number")
    public String getBusNumber() {
        return busNumber;
    }

    public void setBusNumber(String busNumber) {
        this.busNumber = busNumber;
    }

    @Basic
    @Column(name = "updateid")
    public String getUpdateid() {
        return updateid;
    }

    public void setUpdateid(String updateid) {
        this.updateid = updateid;
    }

    @Basic
    @Column(name = "updatetime")
    public Timestamp getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Timestamp updatetime) {
        this.updatetime = updatetime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TInsBuyModel that = (TInsBuyModel) o;

        if (insId != null ? !insId.equals(that.insId) : that.insId != null) return false;
        if (carid != null ? !carid.equals(that.carid) : that.carid != null) return false;
        if (forcedCost != null ? !forcedCost.equals(that.forcedCost) : that.forcedCost != null) return false;
        if (busCost != null ? !busCost.equals(that.busCost) : that.busCost != null) return false;
        if (forcedPoundage != null ? !forcedPoundage.equals(that.forcedPoundage) : that.forcedPoundage != null)
            return false;
        if (busPoundage != null ? !busPoundage.equals(that.busPoundage) : that.busPoundage != null) return false;
        if (forcedInsureTime != null ? !forcedInsureTime.equals(that.forcedInsureTime) : that.forcedInsureTime != null)
            return false;
        if (busInsureTime != null ? !busInsureTime.equals(that.busInsureTime) : that.busInsureTime != null)
            return false;
        if (forcedInsCom != null ? !forcedInsCom.equals(that.forcedInsCom) : that.forcedInsCom != null) return false;
        if (busInsCom != null ? !busInsCom.equals(that.busInsCom) : that.busInsCom != null) return false;
        if (forcedInsureStart != null ? !forcedInsureStart.equals(that.forcedInsureStart) : that.forcedInsureStart != null)
            return false;
        if (forcedInsureEnd != null ? !forcedInsureEnd.equals(that.forcedInsureEnd) : that.forcedInsureEnd != null)
            return false;
        if (busInsureStart != null ? !busInsureStart.equals(that.busInsureStart) : that.busInsureStart != null)
            return false;
        if (busInsureEnd != null ? !busInsureEnd.equals(that.busInsureEnd) : that.busInsureEnd != null) return false;
        if (forcedOpTime != null ? !forcedOpTime.equals(that.forcedOpTime) : that.forcedOpTime != null) return false;
        if (busYear != null ? !busYear.equals(that.busYear) : that.busYear != null) return false;
        if (forcedYear != null ? !forcedYear.equals(that.forcedYear) : that.forcedYear != null) return false;
        if (busOpTime != null ? !busOpTime.equals(that.busOpTime) : that.busOpTime != null) return false;
        if (forcedNumber != null ? !forcedNumber.equals(that.forcedNumber) : that.forcedNumber != null) return false;
        if (busEnd != null ? !busEnd.equals(that.busEnd) : that.busEnd != null) return false;
        if (forcedEnd != null ? !forcedEnd.equals(that.forcedEnd) : that.forcedEnd != null) return false;
        if (busNumber != null ? !busNumber.equals(that.busNumber) : that.busNumber != null) return false;
        if (updateid != null ? !updateid.equals(that.updateid) : that.updateid != null) return false;
        if (updatetime != null ? !updatetime.equals(that.updatetime) : that.updatetime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = insId != null ? insId.hashCode() : 0;
        result = 31 * result + (carid != null ? carid.hashCode() : 0);
        result = 31 * result + (forcedCost != null ? forcedCost.hashCode() : 0);
        result = 31 * result + (busCost != null ? busCost.hashCode() : 0);
        result = 31 * result + (forcedPoundage != null ? forcedPoundage.hashCode() : 0);
        result = 31 * result + (busPoundage != null ? busPoundage.hashCode() : 0);
        result = 31 * result + (forcedInsureTime != null ? forcedInsureTime.hashCode() : 0);
        result = 31 * result + (busInsureTime != null ? busInsureTime.hashCode() : 0);
        result = 31 * result + (forcedInsCom != null ? forcedInsCom.hashCode() : 0);
        result = 31 * result + (busInsCom != null ? busInsCom.hashCode() : 0);
        result = 31 * result + (forcedInsureStart != null ? forcedInsureStart.hashCode() : 0);
        result = 31 * result + (forcedInsureEnd != null ? forcedInsureEnd.hashCode() : 0);
        result = 31 * result + (busInsureStart != null ? busInsureStart.hashCode() : 0);
        result = 31 * result + (busInsureEnd != null ? busInsureEnd.hashCode() : 0);
        result = 31 * result + (forcedOpTime != null ? forcedOpTime.hashCode() : 0);
        result = 31 * result + (busYear != null ? busYear.hashCode() : 0);
        result = 31 * result + (forcedYear != null ? forcedYear.hashCode() : 0);
        result = 31 * result + (busOpTime != null ? busOpTime.hashCode() : 0);
        result = 31 * result + (forcedNumber != null ? forcedNumber.hashCode() : 0);
        result = 31 * result + (busEnd != null ? busEnd.hashCode() : 0);
        result = 31 * result + (forcedEnd != null ? forcedEnd.hashCode() : 0);
        result = 31 * result + (busNumber != null ? busNumber.hashCode() : 0);
        result = 31 * result + (updateid != null ? updateid.hashCode() : 0);
        result = 31 * result + (updatetime != null ? updatetime.hashCode() : 0);
        return result;
    }
}
